{% extends "base.html" %} {% block title %}{% if doctor_view %}Patient Medical History — Quick Care Connect{% else %}Medical History — Quick Care Connect{% endif %}{% endblock %} {% block content %}

{% if doctor_view %}Patient Medical History{% else %}Medical History{% endif %}

{% if doctor_view %} {{ patient.user.name }}'s complete health timeline — consultations & uploaded records {% else %} Your complete health timeline — consultations & uploaded records {% endif %}

{% if not doctor_view %} Upload Document {% endif %}
Consultation Records
{% if specialties %}
{% for spec in specialties %} {% endfor %} {% if current_specialty %} {% else %} {% endif %}
{% endif %}
{% if histories %}
{% for history in histories %}
{{ history.doctor.category }} {% if history.source == 'auto_prescription' %} Auto — Prescription {% elif history.source == 'manual_upload' %} Manually Added {% endif %}
{{ history.created_at.strftime('%d %b %Y, %I:%M %p') }}
{{ history.doctor.user.name }}
Reason given: {{ history.disease.replace('_',' ').title() }}
{% if history.appointment and history.appointment.prescription %} View Prescription {% endif %}
{% if history.diagnosis %}
Final Diagnosis: {{ history.diagnosis }}
{% endif %}
{% endfor %}
{% else %}
No consultation history yet

After completing appointments, your consultation records will appear here automatically.

Find Doctors
{% endif %}
Uploaded Documents
{% if not doctor_view %} Manage {% endif %}
{% if documents %}
{% for doc in documents %}
{% if doc.file_type == 'pdf' %} {% else %} {% endif %}

{{ doc.filename }}

{{ doc.category_display }} {{ doc.uploaded_at.strftime('%d %b %Y') }}
{% endfor %}
{% else %}
No documents uploaded yet. {% if not doctor_view %} Upload lab reports, X-rays, or other records. {% endif %}
{% endif %}
Health Summary

{{ patient_categories_count }}

Categories

{{ histories|length }}

Visits

{{ documents|length }}

Documents
Health Profile
{% if not doctor_view %} {% endif %}
{% if patient.blood_group %}
Blood Group: {{ patient.blood_group }}
{% endif %} {% if patient.allergies %}
Allergies:

{{ patient.allergies }}

{% endif %} {% if patient.medical_history %}
Pre-existing Conditions:

{{ patient.medical_history }}

{% endif %} {% if not patient.blood_group and not patient.allergies and not patient.medical_history %}
No health profile data added yet.
{% endif %}
{% if not doctor_view %} {% endif %}
{% endblock %}